package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EmpSocStatus;

import java.math.BigDecimal;
import java.util.List;
import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.EmpSocPlanExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpSocPlanExample.E_COMPANY_PF_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.E_COMPANY_SOC_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.E_EMP_ID;
import static org.jsola.hr.example.EmpSocPlanExample.E_EMP_SOC_STATE;
import static org.jsola.hr.example.EmpSocPlanExample.E_FAIL_CAUSE;
import static org.jsola.hr.example.EmpSocPlanExample.E_FEEDBACK_FLAG;
import static org.jsola.hr.example.EmpSocPlanExample.E_MONTH;
import static org.jsola.hr.example.EmpSocPlanExample.E_PERSONAL_PF_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.E_PERSONAL_SOC_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.E_SCHEME_ID;
import static org.jsola.hr.example.EmpSocPlanExample.E_SERVICE_COST;
import static org.jsola.hr.example.EmpSocPlanExample.E_TYPE;
import static org.jsola.hr.example.EmpSocPlanExample.E_YEAR;
import static org.jsola.hr.example.EmpSocPlanExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpSocPlanExample.M_EMP_ID_MAX;
import static org.jsola.hr.example.EmpSocPlanExample.M_EMP_SOC_STATE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpSocPlanExample.M_FAIL_CAUSE_MAX;
import static org.jsola.hr.example.EmpSocPlanExample.M_MONTH_MAX;
import static org.jsola.hr.example.EmpSocPlanExample.M_SCHEME_ID_MAX;
import static org.jsola.hr.example.EmpSocPlanExample.M_YEAR_MAX;
import static org.jsola.hr.example.EmpSocPlanExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpSocPlanExample.N_COMPANY_PF_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.N_COMPANY_SOC_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.N_EMP_ID;
import static org.jsola.hr.example.EmpSocPlanExample.N_EMP_SOC_STATE;
import static org.jsola.hr.example.EmpSocPlanExample.N_FAIL_CAUSE;
import static org.jsola.hr.example.EmpSocPlanExample.N_FEEDBACK_FLAG;
import static org.jsola.hr.example.EmpSocPlanExample.N_MONTH;
import static org.jsola.hr.example.EmpSocPlanExample.N_PERSONAL_PF_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.N_PERSONAL_SOC_AMOUNT;
import static org.jsola.hr.example.EmpSocPlanExample.N_SCHEME_ID;
import static org.jsola.hr.example.EmpSocPlanExample.N_SERVICE_COST;
import static org.jsola.hr.example.EmpSocPlanExample.N_TYPE;
import static org.jsola.hr.example.EmpSocPlanExample.N_YEAR;

/**
 * 增减员计划表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【增减员计划表】的参数")
@Data
public class EmpSocPlanUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_EMP_ID, example = E_EMP_ID)
    @Length(max = 32, message = M_EMP_ID_MAX)
    private String empId;

    @ApiModelProperty(notes = N_YEAR, example = E_YEAR)
    @Length(max = 32, message = M_YEAR_MAX)
    private String year;

    @ApiModelProperty(notes = N_MONTH, example = E_MONTH)
    @Length(max = 32, message = M_MONTH_MAX)
    private String month;

    @ApiModelProperty(notes = N_TYPE, example = E_TYPE)
    private Integer type;

    @ApiModelProperty(notes = N_FEEDBACK_FLAG, example = E_FEEDBACK_FLAG)
    private Integer feedbackFlag;

    @ApiModelProperty(notes = N_SCHEME_ID, example = E_SCHEME_ID)
    @Length(max = 32, message = M_SCHEME_ID_MAX)
    private String schemeId;

    @ApiModelProperty(notes = N_PERSONAL_SOC_AMOUNT, example = E_PERSONAL_SOC_AMOUNT)
    private BigDecimal personalSocAmount;

    @ApiModelProperty(notes = N_PERSONAL_PF_AMOUNT, example = E_PERSONAL_PF_AMOUNT)
    private BigDecimal personalPfAmount;

    @ApiModelProperty(notes = N_COMPANY_SOC_AMOUNT, example = E_COMPANY_SOC_AMOUNT)
    private BigDecimal companySocAmount;

    @ApiModelProperty(notes = N_COMPANY_PF_AMOUNT, example = E_COMPANY_PF_AMOUNT)
    private BigDecimal companyPfAmount;

    @ApiModelProperty(notes = N_SERVICE_COST, example = E_SERVICE_COST)
    private BigDecimal serviceCost;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_FAIL_CAUSE, example = E_FAIL_CAUSE)
    @Length(max = 255, message = M_FAIL_CAUSE_MAX)
    private String failCause;

    @ApiModelProperty(notes = N_EMP_SOC_STATE, example = E_EMP_SOC_STATE, allowableValues = EmpSocStatus.VALUES_STR)
    @Const(constClass = EmpSocStatus.class, message = M_EMP_SOC_STATE_ENUM_NOT_MATCH)
    private Integer empSocState;

    private List<EmpSocPlanItemUpdateDTO> itemUpdateList;
}

